Skip to content

Fix #7898: Handle annotation without symbols #7900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 6, 2020

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@nicolasstucki nicolasstucki self-assigned this Jan 6, 2020
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, LGTM

@@ -1228,7 +1228,7 @@ class SourceCodePrinter[R <: Reflection & Singleton](val tasty: R)(syntaxHighlig

def printAnnotation(annot: Term)(given elideThis: Option[Symbol]): Buffer = {
val Annotation(ref, args) = annot
if (annot.symbol.owner.fullName == "scala.internal.quoted.showName") this
if (annot.symbol.exists && annot.symbol.owner.fullName == "scala.internal.quoted.showName") this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the comparison symbolic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do it later. It is not the only instance that uses string comparisons.

@nicolasstucki nicolasstucki marked this pull request as ready for review January 6, 2020 12:49
@nicolasstucki nicolasstucki merged commit 760deff into scala:master Jan 6, 2020
@nicolasstucki nicolasstucki deleted the fix-#7898 branch January 6, 2020 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants